<ng-form name="fieldForm">
  <div
    class="form-group"
    ng-class="{'has-error': fieldForm.input.$dirty && fieldForm.input.$invalid}">
    <label for="input" class="control-label col-sm-4">
      <span>{{field.name}}</span>
    </label>
    <div class="col-sm-8">
      <input
        type="text"
        name="input"
        class="form-control"
        minlength="{{field.min}}"
        maxlength="{{field.max}}"
        ng-model="field.value"
        ng-model-options="{debounce: 500}"
        ng-disabled="field.disabled"
        tabindex="{{index}}"
        ng-pattern="getRe()"
        ng-required={{field.required}} />
      <p class="help-block" ng-if="field.help">
        {{field.help}}
      </p>
      <div class="input-error">
        <span
          class="error text-brand-danger"
          ng-show="fieldForm.input.$dirty && fieldForm.input.$invalid"
          ng-i18next="avRegistration.invalidDataRegEx"></span>
      </div>
    </div>
  </div>
</ng-form>